caspersuitefandomcom-20200214-history
Tweaking your JSS server
I would like to preface this wiki article by stating a few things: 1) This is going to alter your JSS, which is probably in production. Ensure you have current back ups 2) This article will have you accessing the command line, but fear not, it is actually quite easy 3) Use this advice at your own risk, see 1 OK, so now that we have your attention let's get started. Several times over the years I have had people contact me via email about tweaking their JSS server to run in a larger environment. We have thousands of Mac clients checking in every day, multiple times a day. Our database is rather large and our web front end gets heavily taxed. Since this is a daily thing in our environment we have had to upgrade our servers and we have also had to tweak our JSS extenisvely to work better for us. Out of the box the JSS doesn't configure the way we need it to. One common request I had was how to increase the amount of memory Tomcat can use since out the box the JSS Setup Utility only allows for a user to set a maximum of 8 gigs of RAM for the Tomcat service to use. After many tweakings, and trials and tribulations, we decided that 16 gigs was really more what we wanted. To do this, you simply edit one file, located here: '/Library/LaunchDaemons/com.jamfsoftware.tomcat.plist' This file will hold the proper configurations for what you want to do. If you ssh into your Casper server and as root, edit that file with like pico or nano (or vi if you got a long beard) you will see something like this: Now, the certain part of this file that we want to modify is just two strings in the XML file. The strings are: '''-Xms1024m -Xmx16384m' The Xms is the minimum amount of RAM we want Tomcat to use and the Xmx is the maximum we want Tomcat to use. This was taken from my JSS and as you can see, our minim setting is set to 1gig and our maximum amount of RAM setting is set to 16 gigs. For changes to take effect you must restart the Tomcat service and you can do so by just running this from the command line: 'sudo jssutil rt' Tomcat will restart and your settings will now take place. However, if you go into the JSS Setup Utility and modify Tomcat at all, it will revert back to the old settings. So keep that in mind. Also, when you upgrade from an older version to a newer one you may have to go back in and reapply these changes again. The other thing I was asked a lot in emails was how to edit and configure MySQL for a larger environment. This was an issue for us because the out of the box configuration for MySQL really was not what we needed at all. The main things I had to tweak were to allow for a larger packet size and increase the maximum connection pool. The max packet size is the amount of RAM that MySQL can use in a single query viewing tables (or blobs) in the database. I think at default it is set to 1 MB, which is fine unless you have a log file you are trying to flush which as ran 16 million times on 6,000 computers, then it doesn't flush. Then your JSS gets back logged and hangs. So, this is also quite simple and can be done from the command line. MySQL configuration file lives here: '/etc/my.cnf' Simply open this file with pico or any other text editor and find and replace these lines with the desired value: '''max_allowed_packet = 256' max_connections = 400 This configuration allowed me to change the max allowed packet size from 1MB to 256MB and the max connections from whatever the default is, to 400. Of course you now need to restart MySQL and you can do so by using /sbin/systemstarter. So for example: sudo systemstarter restart mysql